{  ACMP.RU
   Statement: http://acmp.ru/?main=task&id_task=7
   Verdict: Accepted
}
uses 
    SysUtils, Math;
    
var 
    s,s1,s2,s3:string;
    kk:longint;
    
function compare(s,t:string):boolean;

var 
    i,ls,lt:longint; 
    
begin
ls:=length(s);
lt:=length(t);
if ls>lt then result:=true else
if ls<lt then result:=false else begin
    result:=true;
    i:=0;
    while i<ls do begin
    inc(i);
        if s[i]<t[i] then begin
            result:=false;
            exit;
        end else
        if s[i]>t[i] then exit;
    end;
end;
end;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
kk:=pos(' ',s);
s1:=copy(s,1,kk-1);
delete(s,1,kk);
kk:=pos(' ',s);
s2:=copy(s,1,kk-1);
delete(s,1,kk);
s3:=s;
if compare(s1,s2) and compare(s1,s3) then write(s1) else
if compare(s2,s1) and compare(s2,s3) then write(s2) else write(s3);
end.